//
//  SLUtils.h
//  MyChatDemo
//
//  Created by DragonYao on 2017/9/11.
//  Copyright © 2017年 DragonYao. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "AppDelegate.h"
#import "UIView+Extension.h"

#ifdef DEBUG
# define SLog(...) NSLog(@"%s" @"%@", __func__, [NSString stringWithFormat:__VA_ARGS__])
#else
# define SLog(...) NSLog(__VA_ARGS__)
#endif

//define keys for UserDefaults
extern NSString *const kUserNumberId;
extern NSString *const kUserPassword;
extern NSString *const kUserRegisterId;
extern NSString *const kRegisterPassword;
extern NSString *const kUserHasLogin;

//define keys for Notifications
extern NSString *const kUserLoginStatusNotification;//自动登录通知

//Others
extern NSString *const kLoginDomain;

//define comment keys
#define kWIDTH   [UIScreen mainScreen].bounds.size.width
#define kHEIGHT  [UIScreen mainScreen].bounds.size.height
#define SLColor(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]

static UInt16 kDomainPort = 5222;
static CGFloat kNaviH = 64.0;
static CGFloat kStatusBarH = 20.0;
//chat cell comment
static CGFloat kHeadW = 35.0;
static CGFloat kHeadH = 35.0;
static CGFloat kPadding = 10.0;
static CGFloat kTriWidth = 12.0;//气泡的三角宽度
static CGFloat kMaxImgHeight = 200.0;
static CGFloat kMaxImgWidth = 220.0;

@interface SLUtils : NSObject

/**
 *  给一个storyboard名称，显示storyboard的初始化控制器
 */
+ (void)showInitialViewWithStoryboard:(NSString *)storyboardName;

/**
 *  判断是否为空字符串
 */
+ (BOOL)isNilString:(NSString *)aString;

@end
